package Utils;

public class Semente {

	private static final long LIM_INF = 3;
	private static final long LIM_SUP = 1000000;
	
	public static long gera() {
		
		long num = (long) (LIM_INF + (Math.random()*LIM_SUP));

	    if (verifica(num)) return num;
	    else return(gera());
		
	}
	
	 private static boolean verifica(long num) {
		 int count = 0;
		 for (int i = 1; i < Math.sqrt(num); i++) {
			if (num % i == 0) count++;
		 }
		 
		 return count == 1;
	 }

}
